package com.sgb.kjwl.model.entity;

import android.text.TextUtils;

import com.google.gson.annotations.SerializedName;
import com.sgb.kjwl.model.entity.user.ServerAttrValue;
import com.sgb.kjwl.model.entity.user.SkuItemAttrEntity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author cfk
 * 时间：2020.04.10
 * 描述：个人中心--商品详情
 */
public class NewGoodsDetailEntity {
    @SerializedName("id")
    private String id;
    @SerializedName("title")
    private String cartTitle;
    @SerializedName("price")
    private String price;
    @SerializedName("updateTime")
    private String updateTime;
    @SerializedName("rate")
    private String rate;
    @SerializedName("brandName")
    private String brandName;
    @SerializedName("unit")
    private String unit;
    @SerializedName("storage")
    private String storageName;
    @SerializedName("areaName")
    private String areaName;
    @SerializedName(value = "ItemAttr", alternate = {"itemAttr"})
    private List<SkuItemAttrEntity> itemAttr;
    @SerializedName("originItemAttr")
    private List<ParamsEntity> originItemAttr;//商品属性
    @SerializedName("itemDesc")
    private String itemDesc;
    @SerializedName("shopId")
    private String shopId;
    @SerializedName("images")
    private ArrayList<String> images;
    @SerializedName("status")
    private String status;
    @SerializedName("videoId")
    private String videoId;
    @SerializedName("itemDetail")
    private String itemDetail;
    @SerializedName("playUrl")
    private String playUrl;
    @SerializedName("playDuration")
    private String playDuration;
    @SerializedName("sellProvinceName")
    private String sellProvinceName;
    private SelectArr checkedItemAttr;
    private String priceScope;//价格区间
    private String lowestbuy;//最低采购量
    private String commodityType;//货期类型
    private String deliveryTime;//货期时间
    private String deliveryTimeUnit;//货期时间单位
    private List<VideoEntity> videoList;//视频列表
    private String itemTitleUrl;//其他信息url
    private String minPrice;
    private int promoteStatus;

    public int getPromoteStatus() {
        return promoteStatus;
    }

    public void setPromoteStatus(int promoteStatus) {
        this.promoteStatus = promoteStatus;
    }

    private CommoditySku commoditySku;

    public CommoditySku getCommoditySku() {
        return commoditySku;
    }

    public void setCommoditySku(CommoditySku commoditySku) {
        this.commoditySku = commoditySku;
    }

    public class CommoditySku {
        private String id;
        private double money;

        public double getMoney() {
            return money;
        }

        public void setMoney(double money) {
            this.money = money;
        }

        private List<commoditySkuListItem> list = new ArrayList<>();


        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public List<commoditySkuListItem> getList() {
            return list;
        }

        public void setList(List<commoditySkuListItem> list) {
            this.list = list;
        }
    }


    public class commoditySkuListItem implements Serializable {


        /**
         * id : 1461240292715008000
         * attribute : 1064
         * val : 111
         * valId : 6244
         * parentId : 1461240291884535813
         * name : null
         * createTime : null
         * updateTime : null
         * createUser : null
         * updateUser : null
         */

        private String valId;
        private String val;


        public String getValId() {
            return valId;
        }

        public void setValId(String valId) {
            this.valId = valId;
        }

        public String getVal() {
            return val;
        }

        public void setVal(String val) {
            this.val = val;
        }
    }

    public String getMinPrice() {
        return minPrice;
    }

    public void setMinPrice(String minPrice) {
        this.minPrice = minPrice;
    }

    /**
     * 商品服务属性
     */
    private List<ServerAttrValue> itemServerAttrVals;

    public String getPriceScope() {
        return priceScope;
    }

    public void setPriceScope(String priceScope) {
        this.priceScope = priceScope;
    }

    public SelectArr getCheckedItemAttr() {
        return checkedItemAttr;
    }

    public void setCheckedItemAttr(SelectArr checkedItemAttr) {
        this.checkedItemAttr = checkedItemAttr;
    }

    public NewGoodsDetailEntity() {
        itemAttr = new ArrayList<>();
    }

    public ArrayList<String> getImages() {
        return images;
    }

    public void setImages(ArrayList<String> images) {
        this.images = images;
    }

    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCartTitle() {
        return cartTitle;
    }

    public void setCartTitle(String cartTitle) {
        this.cartTitle = cartTitle;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getRate() {
        return rate;
    }

    public void setRate(String rate) {
        this.rate = rate;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getStorageName() {
        return storageName;
    }

    public void setStorageName(String storageName) {
        this.storageName = storageName;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getItemDesc() {
        return itemDesc;
    }

    public List<SkuItemAttrEntity> getItemAttr() {
        return itemAttr;
    }

    public void setItemAttr(List<SkuItemAttrEntity> itemAttr) {
        this.itemAttr = itemAttr;
    }

    public void setItemDesc(String itemDesc) {
        this.itemDesc = itemDesc;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getVideoId() {
        return videoId;
    }

    public void setVideoId(String videoId) {
        this.videoId = videoId;
    }

    public String getItemDetail() {
        return itemDetail;
    }

    public void setItemDetail(String itemDetail) {
        this.itemDetail = itemDetail;
    }

    public String getPlayUrl() {
        return playUrl;
    }

    public void setPlayUrl(String playUrl) {
        this.playUrl = playUrl;
    }

    public String getPlayDuration() {
        return playDuration;
    }

    public void setPlayDuration(String playDuration) {
        this.playDuration = playDuration;
    }

    public String getSellProvinceName() {
        return sellProvinceName;
    }

    public void setSellProvinceName(String sellProvinceName) {
        this.sellProvinceName = sellProvinceName;
    }

    public String getLowestbuy() {
        if (TextUtils.isEmpty(lowestbuy)) {
            return "暂无数据";
        } else {
            return lowestbuy;
        }
    }

    public void setLowestbuy(String lowestbuy) {
        this.lowestbuy = lowestbuy;
    }

    public String getCommodityType() {
        return commodityType;
    }

    public void setCommodityType(String commodityType) {
        this.commodityType = commodityType;
    }

    public String getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(String deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public String getDeliveryTimeUnit() {
        return deliveryTimeUnit;
    }

    public void setDeliveryTimeUnit(String deliveryTimeUnit) {
        this.deliveryTimeUnit = deliveryTimeUnit;
    }

    public List<ParamsEntity> getOriginItemAttr() {
        return originItemAttr;
    }

    public void setOriginItemAttr(List<ParamsEntity> originItemAttr) {
        this.originItemAttr = originItemAttr;
    }

    public List<VideoEntity> getVideoList() {
        return videoList;
    }

    public void setVideoList(List<VideoEntity> videoList) {
        this.videoList = videoList;
    }

    public String getItemTitleUrl() {
        return itemTitleUrl;
    }

    public void setItemTitleUrl(String itemTitleUrl) {
        this.itemTitleUrl = itemTitleUrl;
    }

    public List<ServerAttrValue> getItemServerAttrVals() {
        return itemServerAttrVals;
    }

    public void setItemServerAttrVals(List<ServerAttrValue> itemServerAttrVals) {
        this.itemServerAttrVals = itemServerAttrVals;
    }

    public class CheckedItemAttr {
        private List<SkuCombinationEntity> list;

        public List<SkuCombinationEntity> getList() {
            return list;
        }

        public void setList(List<SkuCombinationEntity> list) {
            this.list = list;
        }
    }

    public static class SelectArr {
        private List<SkuCombinationEntity> list;

        public static class SkuCombinationEntity {
            private String commodity;
            private String unit;
            private String money;
            private String id;
            private int category;
            private List<CombinationList> list;
            private int type;
            private double promotePrice;
            private int promoteStatus = 0;

            public int getPromoteStatus() {
                return promoteStatus;
            }

            public void setPromoteStatus(int promoteStatus) {
                this.promoteStatus = promoteStatus;
            }

            public double getPromotePrice() {
                return promotePrice;
            }

            public void setPromotePrice(double promotePrice) {
                this.promotePrice = promotePrice;
            }

            public String getCommodity() {
                return commodity;
            }

            public void setCommodity(String commodity) {
                this.commodity = commodity;
            }

            public String getUnit() {
                return unit;
            }

            public void setUnit(String unit) {
                this.unit = unit;
            }

            public String getMoney() {
                return money;
            }

            public void setMoney(String money) {
                this.money = money;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public int getCategory() {
                return category;
            }

            public void setCategory(int category) {
                this.category = category;
            }

            public List<CombinationList> getList() {
                return list;
            }

            public void setList(List<CombinationList> list) {
                this.list = list;
            }

            public int getType() {
                return type;
            }

            public void setType(int type) {
                this.type = type;
            }

            public static class CombinationList {
                private String val;
                private String name;
                private int valId;
                private int attribute;

                public String getVal() {
                    return val;
                }

                public void setVal(String val) {
                    this.val = val;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }

                public int getValId() {
                    return valId;
                }

                public void setValId(int valId) {
                    this.valId = valId;
                }

                public int getAttribute() {
                    return attribute;
                }

                public void setAttribute(int attribute) {
                    this.attribute = attribute;
                }
            }
        }

        public List<SkuCombinationEntity> getList() {
            return list;
        }

        public void setList(List<SkuCombinationEntity> list) {
            this.list = list;
        }
    }
}
